package com.antaohua.platfrom.framework.base.interfase;

import java.util.List;
import java.util.Map;


import com.antaohua.platfrom.framework.base.utils.Condition;
import com.antaohua.platfrom.framework.base.utils.PageUtil;
import com.antaohua.platfrom.framework.base.model.UUIDIdentityModel;
import com.antaohua.platfrom.framework.container.ThreeColumn;
import com.antaohua.platfrom.framework.container.ThreeEntry;

public interface BaseDao <E extends UUIDIdentityModel>{

	
	public E save(E entity);
	
	public List<E> save(List<E> entitys) ;
	
	
	public E update(E entity) ;
	
	
	public int updateById(String updateProperty,Object updateData,String id) ;
	
	
	public int updateByProperty(String updateProperty,Object updateData,String whereProperty,Object whereData);
	
	
	public int updateByPropertys(Map<String, Object> updateData,ThreeColumn<String, Condition, Object> wherePropertys);
	
	
	public void delete(E entity) ;
	
	
	public int deleteById(String id) ;
	
	
	public int deleteByIds(String[] ids);
	
	
	public int deleteByProperty(String whereProperty,Object whereData) ;
	
	
	public int deleteByPropertys(ThreeColumn<String, Condition, Object> wherePropertys) ;
	
	
	public E findById(String id) ;
	
	
	public List<E> findByIds(String [] ids);
	
	
	public List<E> findByIds(List<String> ids);
	
	
	public List<E> findAll();
	
	
	public List<E> findAllOrder(String orderProperty , Boolean asc);
	
	
	public PageUtil<E> findAllFotPage(PageUtil<E> page);
	
	
	public PageUtil<E> findAllPageOrder(PageUtil<E> page,String orderProperty , Boolean asc);
	
	
	public List<E> findByProperty(String whereProperty,Object whereData);
	
	
	public List<E> findByProperty(ThreeEntry<String, Condition, Object> whereProperty);
	
	
	public List<E> findByPropertys(Map<String, Object> whereProperty);
	
	
	public List<E> findByPropertys(ThreeColumn<String, Condition, Object> wherePropertys);
	
	
	public List<E> findByPropertyOrder(String whereProperty,Object whereData,String orderProperty , Boolean asc);
	
	
	public List<E> findByPropertysOrder(ThreeColumn<String, Condition, Object> wherePropertys,Map<String, Boolean> orders);
	
	
	public PageUtil<E> findPageByPropertyOrder(PageUtil<E> page,String whereProperty,Object whereData,String orderProperty , Boolean asc);
	
	
	public PageUtil<E> findPageByPropertyOrder(PageUtil<E> page,ThreeEntry<String, Condition, Object> whereProperty,String orderProperty , Boolean asc);
	
	
	public PageUtil<E> findPageByPropertysOrder(PageUtil<E> page,ThreeColumn<String, Condition, Object> wherePropertys,String orderProperty , Boolean asc);
	
	
	public PageUtil<E> findPageByPropertysOrder(PageUtil<E> page,ThreeColumn<String, Condition, Object> wherePropertys,Map<String, Boolean> orders);
	
	
	public Long countByPropertys(ThreeColumn<String, Condition, Object> wherePropertys);
	
	
	public Long countByProperty(ThreeEntry<String, Condition, Object> whereProperty);
	
	
	public Long countByProperty(String whereProperty,Object whereData);
	
	
	public Long count();
}
